package com.financing.platform.vo;

import java.math.BigDecimal;
import java.util.Comparator;

/**
 * @author lisu
 * 	wap_jee_1.3 
 * 	预期收益Double 改成文本框 String 
 *  lisu
 */
public class ProductProfitAndRebateVO extends BaseVO implements Comparator<ProductProfitAndRebateVO> {
	
	private static final long serialVersionUID = -3862474312044052165L;
	
	private BigDecimal startAmount;  //起购金额
	private BigDecimal endAmount;  //结束金额
	//wap_jee_1.3 预期收益Double 改成文本框 String lisu
	private String expectAnnualRevenue;  //预期收益
	private Double rebate;
	private BigDecimal sellingPrice;
	private BigDecimal costPrice;
	private BigDecimal corePrice;
	private Boolean rebateIsRatio;
	//是否协议
	private String pIsAgreement;
//	private String amountDisplay; //金额显示
	
	//————订单流程改造 增加后端相关价格
    private BigDecimal costBackPrice;
    private BigDecimal coreBackPrice;
    private BigDecimal backSellingPrice;
    private Double backRabate;
	

	public Double getRebate() {
		return rebate;
	}
	public String getExpectAnnualRevenue() {
		return expectAnnualRevenue;
	}
	public void setExpectAnnualRevenue(String expectAnnualRevenue) {
		this.expectAnnualRevenue = expectAnnualRevenue;
	}
	public void setRebate(Double rebate) {
		this.rebate = rebate;
	}
	public Boolean getRebateIsRatio() {
		return rebateIsRatio;
	}
	public void setRebateIsRatio(Boolean rebateIsRatio) {
		this.rebateIsRatio = rebateIsRatio;
	}
	public BigDecimal getStartAmount() {
		return startAmount;
	}
	public void setStartAmount(BigDecimal startAmount) {
		this.startAmount = startAmount;
	}
	public BigDecimal getEndAmount() {
		return endAmount;
	}
	public void setEndAmount(BigDecimal endAmount) {
		this.endAmount = endAmount;
	}
	
	/**
	 * 金额显示
	 * @return
	 */
	public String getAmountDisplay() {
		if(endAmount == null)
			return String.valueOf(startAmount.longValue()/10000) + "万以上（不含）";
		else
			return String.valueOf(startAmount.longValue()/10000) + "-" + String.valueOf(endAmount.longValue()/10000 +"万元");
	}
	
	@Override
	public int compare(ProductProfitAndRebateVO p1, ProductProfitAndRebateVO p2) {
		 //起始金额比较

		  int flag=p1.getStartAmount().compareTo(p2.getStartAmount());
		  
		  return flag;
	}
	public BigDecimal getSellingPrice() {
		return sellingPrice;
	}
	public void setSellingPrice(BigDecimal sellingPrice) {
		this.sellingPrice = sellingPrice;
	}
	public BigDecimal getCostPrice() {
		return costPrice;
	}
	public void setCostPrice(BigDecimal costPrice) {
		this.costPrice = costPrice;
	}
	public BigDecimal getCorePrice() {
		return corePrice;
	}
	public void setCorePrice(BigDecimal corePrice) {
		this.corePrice = corePrice;
	}
	public String getpIsAgreement() {
		return pIsAgreement;
	}
	public void setpIsAgreement(String pIsAgreement) {
		this.pIsAgreement = pIsAgreement;
	}
	public BigDecimal getCostBackPrice() {
		return costBackPrice;
	}
	public void setCostBackPrice(BigDecimal costBackPrice) {
		this.costBackPrice = costBackPrice;
	}
	public BigDecimal getCoreBackPrice() {
		return coreBackPrice;
	}
	public void setCoreBackPrice(BigDecimal coreBackPrice) {
		this.coreBackPrice = coreBackPrice;
	}
	public BigDecimal getBackSellingPrice() {
		return backSellingPrice;
	}
	public void setBackSellingPrice(BigDecimal backSellingPrice) {
		this.backSellingPrice = backSellingPrice;
	}
	public Double getBackRabate() {
		return backRabate;
	}
	public void setBackRabate(Double backRabate) {
		this.backRabate = backRabate;
	}
	
	
	
}
